#include<iostream>
using namespace std;
int exam5_21()
{
	char txt[200];
	char a, b;
	int i, ntxt = 0;
	while ((txt[ntxt++] = getchar()) != '\n');
	a = getchar(); getchar(); b = getchar();
	for (i = 0; i < ntxt; i++)
		if (txt[i] == a)
			cout << b;
		else
			cout << txt[i];
	cout << endl;
	return 0;
}